

  *panel analyses for use with PanelDataLongFormwave01subset.dta 

  
use "C:\Users\12154\Dropbox\_DianaToDO\2020 Analyses\_BLM Project\BLM submission\Replication data for BLM\PanelDataLongFormwave01subset.dta" 

xtset CaseId wave

 
tab racehelpself 
tab pdblackwhite 
tab racediffdiff 
tab racehelpReps
tab imself
tab chinaself

gen racehelpself01=(racehelpself-1)/4
gen racehelpReps01=(racehelpReps-1)/4
gen racehelpDems01=(racehelpDems-1)/4


gen pdblackwhite01=(pdblackwhite+4)/8
gen covidworry01=(covidworry-1)/3
gen persfin01=(persfin-1)/4
gen imself01=(imself-1)/4
gen chinaself01=(chinaself-1)/4

tab racehelpself01
tab racehelpReps01
tab racehelpDems01
tab pdblackwhite01

tab covidworry01
tab persfin01


gen imdiffdiff01=(imdiffdiff+4)/8
gen chinadiffdiff01=(chinadiffdiff+4)/8
gen thermdiff2001=(thermdiff20/19)
gen racediffdiff01=(racediffdiff+4)/8

***standardizing by SDs of change scores

gen Sracehelpself01=racehelpself01/.2382817
gen Scovidworry01=covidworry01/.261531
gen Spersfin01=persfin01/.3421586
gen Sunemployed=unemployed/.1998267
gen Simself01=imself01/.2506956
gen Schinaself01=chinaself01/.2382007
gen Sracediffdiff01=racediffdiff01/.2001627
gen Simdiffdiff01=imdiffdiff01/.2001685
gen Schinadiffdiff01=chinadiffdiff01/.1921147
gen Spdblackwhite01=pdblackwhite01/.1793221

*Table 1: change in Perc discrim affects FTs

xtreg thermdiff2001 Spdblackwhite01 c.Scovidworry01##wave Spersfin01 Sunemployed wave, fe 
 

*Table 2/Table S1: personal opinion change on race affects vote change,
**including other issues

xtreg demvote Sracehelpself01 Simself01 Schinaself01 ///
  c.Scovidworry01##wave Spersfin01 Sunemployed wave, fe 
  
xtreg demvoteplus Sracehelpself01 Simself01 Schinaself01  ///
  c.Scovidworry01##wave Spersfin01 Sunemployed wave, fe 
 
xtlogit demvote Sracehelpself01 Simself01 Schinaself01   ///
  c.Scovidworry01##wave Spersfin01 Sunemployed wave, fe or
  
xtlogit demvoteplus Sracehelpself01 Simself01 Schinaself01  ///
  c.Scovidworry01##wave Spersfin01 Sunemployed wave, fe or

  
  
***Table 3/Table S2 Including race and other issue party distances

xtreg demvote Sracediffdiff01 Simdiffdiff01 Schinadiffdiff01 ///
  c.Scovidworry01##wave Spersfin01 Sunemployed , fe 

xtreg demvoteplus Sracediffdiff01 Simdiffdiff01 Schinadiffdiff01  ///
  c.Scovidworry01##wave Spersfin01 Sunemployed wave, fe 
 
xtlogit demvote Sracediffdiff01 Simdiffdiff01 Schinadiffdiff01  ///
  c.Scovidworry01##wave Spersfin01 Sunemployed wave, fe or
  
xtlogit demvoteplus Sracediffdiff01 Simdiffdiff01 Schinadiffdiff01  ///
  c.Scovidworry01##wave Spersfin01 Sunemployed wave, fe or
  
***Table S3: priming test

xtlogit demvote c.Sracediffdiff01##wave  ///
  c.Scovidworry01##wave Spersfin01 Sunemployed , fe or
  
  
xtlogit demvoteplus c.Sracediffdiff01##wave  ///
  c.Scovidworry01##wave Spersfin01 Sunemployed , fe or  
 


***finding SD of change in each IV to use for standardization


drop if wave==.
keep racehelpself01  covidworry01 ///
persfin01 unemployed  imself01 chinaself01  ///
racediffdiff01 imdiffdiff01 chinadiffdiff01 pdblackwhite01 CaseId wave

reshape wide racehelpself01  covidworry01 ///
persfin01 unemployed  imself01 chinaself01  ///
racediffdiff01 imdiffdiff01 chinadiffdiff01 pdblackwhite01, i(CaseId) j(wave)

gen diffracehelp=racehelpself010- racehelpself011
gen diffcovidworry=covidworry010-covidworry011
gen diffpersfin=persfin010-persfin011
gen diffunemployed=unemployed0-unemployed1
gen diffimself=imself010-imself011
gen diffchinaself=chinaself010-chinaself011
gen diffracediffdiff=racediffdiff010-racediffdiff011
gen diffimdiffdiff=imdiffdiff010-imdiffdiff011
gen diffchinadiffdiff=chinadiffdiff010-chinadiffdiff011
gen diffpdblackwhite01=pdblackwhite010-pdblackwhite011

sum diffracehelp covidworry011 diffpersfin diffunemployed diffimself ///
 diffchinaself diffracediffdiff diffimdiffdiff diffchinadiffdiff diffpdblackwhite01

